package com.bootdo.common.dao.entity;

import com.bootdo.common.utils.orm.CommonPage;
import com.bootdo.common.utils.orm.HelpDaoImpl;
import org.springframework.stereotype.Repository;

import javax.persistence.EntityManager;
import java.util.List;

/**
 * Created by allards on 01/30/18.
 * Email: allards@synnex.com
 */
@Repository
public class SysFileRepositoryImpl extends HelpDaoImpl {
    public SysFileRepositoryImpl(EntityManager entityManager) {
        this.entityManager = entityManager;
    }

    List<SysFile> mySearch(){
        String dataSql = "select t.id,t.url,t.type,t.create_date as createDate from sys_file t where 1 = 1";
        CommonPage<SysFile> p = new CommonPage();
        p.setPageNumber(1);
        p.setPageSize(1);
        List<SysFile> l = queryBySQL(dataSql, SysFile.class, p);
        return l;
    }
}
